<html>
<head>
<style type="text/css">
	@import "../themes/tundra/tundra.css";
</style>
<script type="text/javascript" src="../../dojo/dojo.js"
	djConfig="parseOnLoad:true, isDebug:true"></script>
<script type="text/javascript">
	dojo.require("dijit.Menu");

	function setContents(str){
		dojo.byId('iframe').src = "javascript:'" + str.replace("'", "\\'") + "'";
	}
	function button2(){
		setContents('<div style="height: 300px; border: solid blue 2px">bill was here</div>');
	}
</script>
</head>
<body class="claro">
	<div dojoType="dijit.Menu" id="menu" targetNodeIds="iframe" style="display:none;">
		<div dojoType="dijit.MenuItem">context menu</div>
	</div>
	<div style="border: 1px solid gray; height: 150px;">filler div to offset iframe position (for testing)</div>
	<div style="position: relative; border: 3px solid blue; padding: 10px;">
		This is a position:relative div containing an iframe.
		<iframe id="iframe"
			src="javascript:'&lt;html&gt;&lt;body style=\'margin: 3em;\'&gt;&lt;div style=\'height:300px;border:1px solid red;\'&gt;right click for menu&lt;/div&gt;&lt;body&gt;&lt;/html&gt;'"
			style="height: 200px; margin: 30px; padding: 20px; border: solid dotted 10px;" onload="console.log('iframe onload');">
		</iframe>
		End of div.
	</div>
	<br>
	<button onclick="dojo.byId('iframe').src='layout/doc0.html'">reset contents to doc0.html</button>
	<button onclick="button2();">reset contents to 'bill was here'</button>
	<button onclick="dijit.byId('menu').unBindDomNode('iframe')">detach menu</button>
	<button onclick="dijit.byId('menu').bindDomNode('iframe')">re-attach menu</button>
</body>
</html>
